/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
// pmltbtn.hpp - Definition of Multi-Line text button class.
//
// Author: Kenneth G. Maxwell
//
// Copyright (c) 1997-2000 Swell Software 
//              All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef _PEGMLBUTTON_
#define _PEGMLBUTTON_



class PegMLTextButton : public PegButton
{
    public:
        PegMLTextButton(const PegRect &Size, PEGINT StringId,
                        PEGCHAR Marker  = PEG_DEF_ML_MARKER,
                        PEGUINT Id = 0,
                        PEGULONG Style = TJ_CENTER|AF_ENABLED);

        PegMLTextButton(const PEGCHAR *pText, const PegRect &Size,
                        PEGCHAR Marker  = PEG_DEF_ML_MARKER,
                        PEGUINT Id = 0,
                        PEGULONG Style = TJ_CENTER|AF_ENABLED);

        virtual ~PegMLTextButton();

        virtual void DataSet(const PEGCHAR *Text);
        virtual void DataSet(PEGUINT StringId);

        virtual void Draw(const PegRect &Invalid);
        virtual void SetFont(PEGUINT FontIndex);

    protected:
        void FreeTextInfo(void);
        PEGINT ParseButtonText(const PEGCHAR *pText);

        PEGCHAR **mpTextLines;
        PEGINT   *mpWidths;
        PEGINT    mNumRows;
        PEGCHAR   mMarker;
};


#endif




